package megrez.job.custom.domain;

import org.springframework.stereotype.Service;

import lombok.RequiredArgsConstructor;
import megrez.job.custom.utils.ConfigNotFoundException;

/**
 * 服务
 * 
 * @author Lucky Yang
 * @since 2.6.9
 */
@Service
@RequiredArgsConstructor
public class ConfigService {
    private final ConfigRepository configRep;

    public Config findById(String id) {
        return configRep.findById(id).orElseThrow(() -> new ConfigNotFoundException(id));
    }

}
